All-Pairs-Shortest-Paths in Spark

نویسندگان

  • Charles Y. Zheng
  • Jingshu Wang
چکیده

We propose an algorithm for the All-Pairs-Shortest-Paths (APSP) problem suitable for implementation in Spark, and analyze its performance. We begin by considering distributed Floyd-Warshall, as proposed by Kumar and Singh (1991). Distributed Floyd-Warshall has asymptotically optimal scaling and can be implemented in Spark by using BlockMatrix to represent the APSP distance matrix. However, we observe that its implementation in Spark suffers from poor performance for medium-sized problems due the large number of global updates of the APSP distance matrix required for the algorithm. Since the lineage of the algorithm grows with the number of vertices n, it becomes necessary to use a proportional number of checkpoints which further impacts the efficiency of the algorithm. This motivates the consideration of an algorithm for APSP which requires fewer global update steps. We adapt an approach by Solomonik et al. (2013) based on the “divide and conquer” algorithm for APSP. Our algorithm reduces the number of global updates by a factor of b, where the block size b determines the amount of computation done in each iteration. By adjusting the block size b we obtain a favorable tradeoff between checkpointing costs and computation cost per iteration, resulting in far improved performance compared to Distributed Floyd-Warshall.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

All Pairs Shortest Paths Algorithms

Given a communication network or a road network one of the most natural algorithmic question is how to determine the shortest path from one point to another. In this paper we deal with one of the most fundamental problems of Graph Theory, the All Pairs Shortest Path (APSP) problem. We study three algorithms namely The FloydWarshall algorithm, APSP via Matrix Multiplication and the Johnson’s alg...

متن کامل

All - Pairs Shortest Paths in O ( n 2 ) Time with High Probability

We present an all-pairs shortest path algorithm whose running time on a complete directed graph on n vertices whose edge weights are chosen independently and uniformly at random from [0, 1] is O(n2), in expectation and with high probability. This resolves a long-standing open problem. The algorithm is a variant of the dynamic all-pairs shortest paths algorithm of Demetrescu and Italiano [2006]....

متن کامل

Combining All Pairs Shortest Paths and All Pairs Bottleneck Paths Problems

We introduce a new problem that combines the well known All Pairs Shortest Paths (APSP) problem and the All Pairs Bottleneck Paths (APBP) problem to compute the shortest paths for all pairs of vertices for all possible flow amounts. We call this new problem the All Pairs Shortest Paths for All Flows (APSP-AF) problem. We firstly solve the APSP-AF problem on directed graphs with unit edge costs ...

متن کامل

CMSC 451 : Lecture 13 All - Pairs Shortest Paths and the Floyd - Warshall Algorithm

All-Pairs Shortest Paths: Earlier, we saw that Dijkstra’s algorithm and the Bellman-Ford algorithm both solved the problem of computing shortest paths in graphs from a single source vertex. Suppose that we want instead to compute shortest paths between all pairs of vertices. We could do this applying either Dijkstra or Bellman-Ford using every vertex as a source, but today we will consider an a...

متن کامل

All Pairs Shortest Paths on a Hypercube Multiprocessor

Two plausible ways to implement Floyd’s all pairs shortest paths algorithm on a hypercube mutiprocessor are considered. These are evaluated experimentally. A comparison with using Dijkstra’s single source all desitination algorithm on each processor is also done.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015